package com.tan.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class Constant {
    @Value("${qiNiu.accessKey}")
    private String accessKey;
    @Value("${qiNiu.secretKey}")
    private String secretKey;
    @Value("${qiNiu.bucket}")
    private String bucket;
    public static String ACCESSKEY;
    public static String SECRETKEY;
    public static String BUCKET;
    // 对象创建之后执行该方法
    @PostConstruct
    public void init(){
        ACCESSKEY = this.accessKey;
        SECRETKEY = this.secretKey;
        BUCKET = this.bucket;
    }
}

